<?php
    $db_tags = new db_query('SELECT new_id,new_title,new_teaser,new_picture,new_cat_id,new_date,new_tags,new_detail,cat_id,cat_name 
                                    FROM news 
                                    LEFT JOIN categories_multi ON cat_id = new_cat_id 
                                    WHERE new_tags LIKE "%,'.$keyword.',%" OR new_tags LIKE "%'.$keyword.',%" OR new_tags LIKE "%,'.$keyword.'%"
                                    ORDER BY new_date DESC
                                    LIMIT 48'); 
    $list_news_tags = $db_tags->resultArray();
    unset($db_tags);
    $total_search   = count($list_news_tags);
    $db_list_new = new db_query('SELECT new_id,new_title,new_date,new_picture,new_teaser,new_detail,new_hot_home,new_relate,new_tags,new_cat_id,
                                cat_id,cat_name
                                FROM news 
                                LEFT JOIN categories_multi ON cat_id = new_cat_id 
                                WHERE 1
                                ORDER BY new_id DESC 
                                LIMIT 10');
    $list_no_tags = $db_list_new->resultArray();
    unset($db_list_new);
?>